import { SourceView, SourceAndPreview } from '../view'
import { TextModel, SelectionModel } from '../models'
export class ViewProvider {
  provide(viewMode: string, textModel: TextModel, selectionModel: SelectionModel, viewContainer: HTMLElement) {
    switch (viewMode) {
      case 'source':
        return new SourceView(textModel, selectionModel, viewContainer)
        break;
      case 'source_and_preview':
        return new SourceAndPreview(textModel, selectionModel, viewContainer)
        break;
      default:
        return new SourceView(textModel, selectionModel, viewContainer)
    }
  }
}